added to_json method to Table