function filter(u,d) { for(i=0;i