implementing a way to tell the main program that a movement with moveit is finished