refactored setup task