added cursor position stuff