add test cases
improve handling of spaces