Updated from jfairbank/c_white_similarity