modify for ruby2