added comment
implemented draw function