more functions to db generator