initial work on main lib