cleaned up code, implemented face detection and scaled up coordinates