trim ending white spaces