more robust model id computation