max id calculated