drawing and main game loop