reduce hash creation by using update method