Added resize implementation