Add code for moving cursor to end