added ability to return object from sql query 

instead of only being able to cycle through using next()