added the query process
added pbs script so we can actually run the thing before class tomorrow