Added more state logic