compiles
now with inheritance