use virtus to replace the initialization method of class