reachablity code