changes y for pentagon hexagon and triangle