refactored the try to flee function