adding promises to db transactions