same as before with getting type IDs from the models