added some comments at the top