reconsitution middleware