adding more complete notification creation code