only using toJSON to send to the client