add cursor support (badly)