What is an appropriate way of thanking someone for lending you something?

My laptop broke and I needed it for uni so my boss lent me his spare one until I got my new one after christmas. I have had it for two months and am about to return it, and I want to do more than just say thank you, maybe get him a gift or something .. I don’t know?
Whoever said ‘why have you still got it’, because I have arranged to return it on a day that suits him, not that it matters to you, and was totally irrelevant!

I need help writing an agreement for lending money from my boss to me?

my boss is lending me some money (cash advance) and he asked me to write a letter/agreement were i agree to pay back and get deducted every pay period some money. Does any one have a form or example? Help please!