working river wrapping algo, still need to cover cases where people do not want to wrap on the top/bottom.