Added code for getting an instance