code cleaning: add comments