Added history to database