change logic to account for nil in model method