refactor
parents can be safely changed to an slice.
refactor