implement the rest of require + indirect lookup