Modified pursuit and evade function