deleted some lines and added some comments