bugfix: jquery map instead of for loop