Added the task function and documentation