Updated gender similarity calculation