trim space in the end