Add last cursor functionality