added possibility to use/not use X matrix with indicator variables