fix docstring
implement resize function