debug and clean