adding campaign concept and some refactoring