add and nand working