DRY things up a bit - use .each() method to .map() and .filter()