Using newInstance to create an object