build object heirarchy