move resize function