minor added some comments to res