fixes template to display friend's name instead of id
adds friend's name and id into friends array