Debugged and tested various queries