first pass on refactor example to work with sandbox