created and tested the remove from buffer script