still trying to get buffer to work