debug + cleanup