moved forloop to correct position

plates were not being updated