add a test for max scan