Use dynamic class instantiation