implemented IFS coordIndex update and optimized normal generation code