add error checking for sides of 0 length