Added toggle gate