Hacked to allow for custom writers