integrated face detect and processing code