dict and string manip