Added friendship function and tests the friendship function part 2