improved code/mlp.py