Attempting to fix wrapSides(), now returns number of wrapped sides