change kernel helper method and remove all the trailing space