added states and menu