output works if I comment out the stateParameter