add simple examples; somewhat improved performance