Added trim() to remove white space in the strings