Add comments to the python file
fixed bugs