adding class file and example script for connecting and excecuting a query