improving a more sensible approach of nodechild to map for more scenarios