add hook for flash notifications