added check for spaces in between numbers