more complete scanner, needs to finish get_token