added more functionality for merging options when inheriting