refactored. added stats.parent