library refactor update
Updated API