add maxlength support to sorted sets