Added y2 in output equation