fix lookup math