corrected logic of 'be-inheritance' and updated some comments