added class methods to dbmodel, main handler