switch from echo to printf