changes function name to searchWords