updated for better notify API