Shouldn't the parents and children be passed in somewhere, instead of just being fixed in the method?