use Hash#[] instead of Array#to_h for ruby 2.0 compatibility