changed daytype to factor