changed echo to printf to remove newline from output