added function to print bits