factored out Promise creatioion in the db module