Icord with buttonhole on end

Does anyone know the best/easiest way to do this? I’ve been sitting here all morning trying to figure out how I could do this. I knit a cozy for my iPod and want to add a cord to it so that I can wear it around my neck, but I’m adding buttons to the inside so that I can remove the cord when I want to take it with me. So I’m trying to figure out how to do the Icord with a buttonhole on the end.

Nevermind, I figured out a way.