implemented four base classes