Implemented peek and consume