Finding fx,gx, and hx are done