changed to use notifications instead of polling
added a little more output to be able to understand what is going on