added lookup code