step 1 to double buffering!