change a method to determing active