added detection class and updated corresponding methods