Added toggle and toggleFunction