Buddy function works now

Completed the buddy function!