tighter analysis on lookup