add expand and reduce