MLP basic implementation