code cleanup
 rewrite notify status check