Starting out Chan's algorithm