finished for loop and nexted loop