delete unneccessary spaces