PLD: add comments to functions