replace static messages to flash notice