adding history + cleanup