Refactored to use component outside of the task if needed.