added simplex algorithm