handling ending blankspace