Coping with immigration and urbanisation