fixed some indicies and 1 synatx error