gradient descent and nice plotting