Changed reading from JSON.