implemented river rule