real texas hash (slightly adapted)