fixed toggling solution due to syntax error