adding query to mongo plot