Under the "task system," slaves in areas such as Carolina's rice country were allowed more latitude over when and how they did their work. Part of the reason for this greater latitude was that the cultivation of rice involved creating dikes and working in areas that were conducive to sickness (see the source below). This type of hard labor meant that plantation owners were not always directly involved in the work. Some of the work involved coordinating with the tides, so workers had times when the the land was flooded and they could not work at rice cultivation but instead could hunt for their own food. In addition, the task system might have been facilitated by plantation owners' long absences, or their unwillingness to get closely involved with work that involved high levels of disease that were conveyed by mosquitoes (see the source below). However, by the early 1800s, the invention of the cotton gin turned most of the South over to the cultivation of cotton, which was very profitable, and, as the source below notes, this system was run more like a factory than rice cultivation was. This system did not allow slaves to have control over their own work and ended some of the freedom allowed under the task system.