Implement activity function