analysis + cleanup