x and y Derivative written in main.cc