refactored states and templates