some optimization and refactoring for IList