moved transaction() from Helper to DB