moved sprintf tests into right place