snippet of code used for 'friend feed' from class project