refactoring trackingActivity