changed some debugging stuff
implemented serialize
merged format commit