Add removing traing space function