Add resize function.