Fixed detector implemenation, added new parameter(score)