functional inheritance try