functioning gui

added a gui system, and updated the draw shape function with closed loop
detection