right lookup implementation