added param for OnlyMiddleState