scanner basic implementation