started de/serialization of Query and Result