replace explode with preg_split in case more that one space is entered