added comments to the methods.