Implement resize()