For the overall working, you can refer to this page.