Reimplement remap function vol. 2