Added code using new class