adjust formatting scanner implementation