First use dbs.init function to create the dbs object before main() and then use the tables method on the object from main().