utils: simplify API