Change scan function