use sscanf instead of a custom scanner