added alon-spencer invariant