This is the code I wrote during my tutorial here https://www.youtube.com/playlist?list=PLxE2viIA-WCy9hrXIRlgKYHEFX7CW9F_P&feature=view_all