main lib file