do not pass three arguments to $.each because it breaks things badly