added examples
fix ruby 2.0 compatibility issue