working relinearization, need to add binary representation