added closing toggle script