improved command capture ex.