refactoring: simpler and cleaner API.