added some functionality to caret