add comment, fix maxLen bug