now correctly instantiates subclass