preparing resize function to migration