Added inheritance function