changed stuff in loop
changed stuff for index queries