serialize/deserialize location