sharing an initial example code. will refine it later.