I gave you a couple of links that explain how it all works. There are many more where those came from.