changed library worker to not lock up the ui