refactor #states options functions