added state invocation for toggle method