made a sample input loop for getting a character