Changed to more bitwise ops and hex