adding lookup function