add check for overflow in CircularHash class