added functions for word/selection wrapping.