removed draw_end function