added checking for duplicate notifications