simplify square corners/dimensions calculations