beginning porting drawing routines to double buffer