clearer use of if/else in trackNotification