Returnd resize function