added comments and remove useless commented code