use hash rather than hashref