updated for nested reification and also optional reification (not tested)