fixed empty structure inheritance; added relation reading