added frame & fixed some errors in representation for XOR