changed to logToJson