changed from registerinstance to registertype