overhaul the algorithm and use face detection now