implemented single character input and histogram