Code for method findAndSetChildScore