fixed avoidance functions