add new addflash method