Expanded API and example