delete unnecessary spaces