too eager on replacing call to new by createInstance