Continued to work on states and listners