Implemented navigating between states