fix buffer so that it works with lab2 test