preparing to add resampling
finally fixed scaling