Changed query method.