matmul was out of the question due to the silly abs() % 10 rule