Utility functions added (Markus)