added diversion checks