further algorithm and drawer development
clean drawing code