logic for hash win checking laid out more clearly