improved functionality on lib