doublebuffering didn't work correctly so I took it out