a bit code clean up