peekinput implemented