switched defs for clear and set bit. Fixed test code