try to make state immutable