square the input edges