change id to instancetype