Optimized code for find person ruby app (reviewed by Udit).