Added util.py- helper functions