revise documentation

refactored code to specify between the gradient and projected gradient