take advantage of better API to simplify test/example code