What was one of the most difficult tasks that homesteaders faced?