Added some additional comments. tested and works.