deleted unnecessary toggle function