getBit() function added