Changed how IDs are calculated