Projection method for unconstrained optimization