Added function to do custom queries into the data source