changed scroll iteration of grad