Add gradient, partan, newton methods