fixing passing typestate parameters