iteration working
first axis is the innermost axis