getting access to last typed word