added logic for all public activity