moved drawing triangle in another defun