add the implementation of rolling scan.