some fixes and document reduce command