proper handling for more than one space