Added script for single query processing