corrected bug with serialization in regression tests, added test examples