Added inheritance function
Merge pull request #4 from vojtatranta/master

Added inheritance function