tmp - reworking cursor handling