use instancetype instead of id