Watched 2nd video this was the code developed for it