started avoidance function