added active switch