added river functions and search functions