updated getconnectedfriends(added database)

commented the orther code in case you want to continue working without
the database