moved friendship functions to friendship model