Not a fan of putting the function definition right after equals when it's at this level of complexity. Could you put it in braces?