fixed build errors, added lookup function and lookup variable