modify dismiss & present method