implement -n flag first