Montgomery County last week signed a contract with the Hartford Accident and Indemnity Co. that, county librarians said, offers hope that improvements can be made in the library's beleaguered computer system.

Since it began operating in 1980, the computer system has failed to cope with the demands of the county's 19 libraries and 350,000 patrons, library officials said. They said the system has been marred by slow performance, resulting in long lines at checkout desks and piles of books waiting to be checked in. Frequently, librarians said, they have been forced to revert to pen and paper to reserve books for readers. When the computer is down, assistants checking out books have to write out the 14-digit "barcode" for each library card and for every book being taken out.

Hartford, which has held a $437,850 performance bond on the library computer, has agreed to spend up to that amount to try to speed up the system. The company's goal is to make the computer's performance match the terms of the 1978 contract under which the system was built.

The county bought its $875,000 computer system from Systems Control Inc. of California. The company, in turn, bought a bond from Hartford to back up the performance of its devices. Hartford's attorney, William Rogers, said, "We plan to move in quickly" to get the improvements under way. One of the options, he said, is to have SCI do the work.

The county and SCI have spent much of the last two years haggling over the performance of the computer system; earlier this year, SCI asked for an additional $135,000 to improve it. The county, saying it was reluctant to pay SCI any more money, terminated the contract in May and refused to pay the $218,000 it owed SCI. County officials then opened negotiations with Hartford to get the improvements.

Tension between the county and SCI peaked last March when county officials received a telegram telling them how to deactivate a "bug" -- called a time-out -- that was intended to bring the system to a halt March 15 if the county had not paid its bill. SCI vice president Rolf Seitle said he sent the telegram because he had "great hopes we could work things out." SCI declined to say when the bug was put in.

SCI lost money totaling perhaps a third of the $875,000 computer contract, which includes 96 terminals and software, said Rolf Seitle, a vice president of SCI. "We undertook this project in error and the county accepted in error," he said.

Seitle said the design was patterned after a smaller system SCI built for the public library in San Jose, Calif., and that the complexities of the Montgomery county system were impossible to predict.

"It is the largest [public library] system that has ever been built," he said, adding that SCI was breaking new ground in the computer industry when it created the system.

The computer's nemesis is the heavy demand county residents place on the system, librarians said.

"We are being killed by our success," said Susan Kingry, assistant chief of the county libraries. "If we didn't have all these people reading the books it would be fine. The system works fine on Sundays when only four libraries are opened."

Since the system came into use, patrons have been writing in their complaints. "They say, 'How could you waste this much money? This system is junk' -- and these are the nice letters," Kingry said. "Every other patron in Montgomery County is a computer expert and they would come in and say 'If you only had talked to us before you did this (bought SCI's computer).' "

Before the computer was installed, book reserves were handled by individual libraries. One library could have a waiting list for a book that was on the shelf at another library, or a library could wait for a reserved book that had been lost years ago.

Under the new system, when a patron reserves a book, a librarian checks the computer to see if the book is in any of the 19 libraries. If not, the patron gets the next copy returned, no matter which library it is returned to.

Automation also has taken a lot of the guesswork out of book buying. With the computer, librarians can monitor demand more closely and buy more effectively.

When patrons are forced to wait in long lines because of computer down time, it is hard for them to appreciate the behind-the-scenes advances. When Peggy Campbell, a longtime library patron of Chevy Chase Library, was asked what she thought about the computer, she said, "Montgomery County library was in good health before the computer and undoubtedly they will outlive it."