added river func