some refactoring and creating runWar task