current state refactor