added the caret to examples where needed instead of using a global caret