Rewrite toy.py