change hash to map