using a buffer properly now