added a resize function