functionality for confirmActivityButton