Implemented Query and Profile