local notifications code written and partly working