Refactored local task