clean up and commented what is happening