completed utils.py