use sprintf to format strings