rewrote timeline, now accepts json from database