changed each() function param order