Added some comments for greater clarity