tried to fit everything with dummy vars, this has not been cleaned, just a quick hack...