added 1-4: replaceSpaces.cc