completed mimic.py