calculation of criteria