added example
fix bugs