using $.trim instead of string.trim