remade toggle function -> needs to be tested