scan function ongoing