start to translate calculateDAT