Converting Criteria to CPP