added a var to select how many pixels at onece should be set (to reduce the current)