update so, add double buffer code