added macro to replace spaces with commas
full unit test coverage