reimplemented to json