added eye(2*n) to runSQP