added resample_alpha