implemented improved simplex algorithm