Created method doQuery in DBConnect class to simplify db query