modified scanner stuff