problem 22! watch out for \n, \r, etc