implementing add() for c test