Testing out each() and map() function