added TRIM to clean input