updated to use the new class