handle touch event to change the cube