added a simple and a trditinal code to off  the right most set bit