Added basic explanation of code