implemented copy on enter