safety location logic