Inner boundary version with userwork in loop used, although doesn' work