simplify code, using ar_parent.id as hash key it's the same as ar_parent