drawing refactoring