removed unnecessary variables x1, y1