move splitSpaces and isDigit into utils.go