Added basic resampling (downsampling only)