Optimize get criteria method