added linear stepwise expansion