added linear lambdas to SQP and updated SQP to be able to take lambdas as an argument