Added State Controller Functionality