simplify database lookup code by using the find-database method