modified to work on ruby2.0.0 or higher version
modified to work on ruby2.0.0 or higher version