Added better calculation of the reachable set