added persistance and max 20 history entries