Refined activity add function