edit command function