add cursor support (closes #18)