using hash instead of which