Added into a class, restructured