Created drawing function