working but buggy code on adding friends to goals