clean code : remove unused SumXXX, use list and join, remove duplicate