refactor to use data namespace