refactoring && create validate task