add dismiss method