cleaning up get criteria method