adding in statefulness