This video was helpful for me to understand some of the theory behind all this: https://www.youtube.com/watch?v=m9AT7H4GGrA