a bit code cleaning