dealing with emergencies