testing projected gradient method