tables data to lower case and trim