removed downscale duplication (don't repeat yourself)