improved activity detection

changed how activity interrupt is generated and detected