uses an event to determine when to read buffer