added comments to source code