added sql query function