moved string trimming to util module