Toggle implemented, some changes in calling the states made