change buffer update to use reset() instead of temp