Added more state functionality