simplify isVisited
simplify get ovs idx
remove get ovs idx