implemented 2 layer forward propagation