added custom switch