unwind function

Unwinds variance matrix to a vector