scatter matrix and some basic reshaping