draw refactoring