refactored drawing