changed toggle method