What were the advantages of settling in a river valley?