walkthrough the code