add peek function to buffer