Updated task to support targets and switch for fetch