implement line wrapping