Update the manipulator code

comment the code for get a better idea about the source code.