added end notificitaion code

Done.