start on fixing queries