refractor jedis code