added caret listener