rewriting river controller
added index functions for river