simplify cloning tests
finding maximum and minimum elements of vectors & matrices