added more test for toJson and isModified