test case added for reduce spaces fuctionality