richer api, cleaner code