add contravariance to search and shuffling