use `hash` instead of `which`