first step of drawing refactoring