add comments. fix a river problem