Social functions added for HW6
finished HW 6