add toJSON to Theta