add cancast and d to inrange