Rudimentary simplex implementation for week2 assignment