some work for GrahamScan 2