Added in a resize function