port Avatar example to namespaced lib