Updated isoresampling function