added more to mlp.c and added some functions