activity detection working