updated with simulation results for the double buffer