fix up a lack of definitions
transposed() now correct
rand