adding some comments to the code, rename some of them more explicitely