Refactor use hash extension