added new state object to library and included in main application logic