Used a type instead of generic magicIdFromType