reworked inheritance, added casting