get max number with array
remove no use logic
get max num by sort
update doc