refactor STATES 2