some refactoring and tasks added