scan function is added.