reworked the way friends are stored in the database