Updated to support wrapping