implement a naive ring hash, tested