I had trouble figuring out what bufferLoc meant--could you call it bufferIdx, curIdx, headIdx, head or similar instead?