functional inheritance