fixed small bug: using trim()