Adding code to draw the paths of objects