If you ask a question where you don't really understand what you're doing I'm not going to just give you the answer so you can copy-paste code. Instead, I'm going to point you to some documentation and offer some hints and things to think about - maybe alternatives. If you want to be a great programmer you need to learn the details. I'm pretty sure the Apollo spacecraft wasn't copy-pasted. Learn the details and you will be able to make awesome things and help others. Go do that! :)