finished mlp.py