added cursor tracking