new matrix code. also distances are supported