[src] implement resizing method