added GPL v3 and comments to code