added some comments to separate entry file on several logic blocks