refactor campaign functions