added setbit, getbit, save functionality