Here are some videos from Dan Shiffman on the same topic, with slightly different code, talking about things from a different angle then the one I took!