use Hash#each_value instead of creating a new array
fix return value when no block given