get caret positioning working