rework of most libs