move example code into examples
rewrote python example