change function after clicking confirmation