buffer matrix