finished drawing refactoring