fix octet function for 01 puzzle