add and delete spaces