simplifying logic with the buffers