changed datawriter for testing