making this work even with -n