Moving example code to avoid duplication