added req object to serialize/deserialize