A simple inheritance utility function