implement a hashring library