added cursor support