Finished mimic.py code