Added  Richs updates and bitwise function