Added logic for contentProvider