buffer swithcing