Add method for querying the buffer