added cursor functions