Implemented task more like it is in the task description.