refactoring, moving the drawing part to separate drawing method.