Now able to serialize case classes

writing is now entirely type tag based