finish all queries