simplify fns on specialize , most now take matrix instead of having to
explicitly pass along rows and occurrences, simplifies writing test
cases.