added trig logic for drawing lines