change the algorithm for handling notifications