iterative working version of add