some more handling of factors and integer. #112