implement Graham reduction