Added new class and modified according to it