added basic data serialization.