changed echo -n to printf "%s\n" (preferred for portability)