refactor states list from view to instance in controller