no state pattern for r code model