added activity tracking and logging