reanmed
optimized
initial commit
added tissues resampling to func