create function update_selected_activity - break formatting