work on toJson