updated looper to merge data