rewrite get and set bits for easier clear bits