Finished reszing function, preparing for merge.
auto merge fix