separate draw function and clean