simplify and optimize problems about list