trim input space