added inharit function