add some python cookbook code