Changed block variable 'a' to 'activity' to be more expressive