refactored drawing pieces with a new class