add the type based on the type id