set up code so that naiveDetector is ran
fixed some errors. Added proper normalization algorithm