make matrix traversal example work