rework to library