Added the peek method and some tests