improve new hash style command on ruby