declared res = 0