refactored drawing code to use console_clear