fixed history, some problems remained
database is now json