1. extract removeExtraSpace into a new method
2. separate above method from splitName method
3.add test for removeExtraSpace method and modify the test for splitName method