changed order of serialized result. added spec for cases where serialize is called multiple times