implement notification function