added gson serialize and deserialize method