working version, inaccurate facedetect