Implementation of Wrap mode