added adaptive wrap