adjusted to not smooth indicator variables