Update to use scanner class