readVal updated to save each char entered by user