adding comments to understand __construct  function