for regex, replaced " " with \s+ to truly match white space