cleanup idx based input