cleaning, fixing and debugging