main lib