remove unnecessary spaces