cleaned up fitting via dummy variables, seems to be working