moved lines to big matrix
merged with alex