Use sprintf to format values