grasp.cpp partly implemented