improvements to the code
fixed persistent notification