some more refactor passing along the mean object instead of using the exports.parent