timer fixed
split out the canvas and drawing code from the logic code