removing unneccessary spaces