reorganize example code into its own module