Problem solved:downsampling switch case