add activity logic