refactored for new data bag